#!/bin/bash

if [ -f $1 ]; then
    file $1 | grep ASCII > /dev/null
    echo $?
fi